﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Brainee.NeuralNetwork
{
  public class SigmoidFunction : IActivationFunction
  {
    public double Invoke (double d)
    {
      return 1.0 / (1.0 + Math.Exp (-d));
    }

    public bool Differentiable { get { return true; } }

    public double Derivative (double d)
    {
      return d * (1 - d);
    }
  }
}
